// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * ECN数据类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-10-19
 */
public enum EcnBusinessTypeEnum {
    MAIN_DATA(1, "1.4.3","主数据"),
    STOCK_DATA(2, "1.4.5","库存数据"),
    PM_DATA(3, "1.4.7","制购类数据"),
    BOM_DATA(4, "13.5","BOM数据"),
    ROUTING_DATA(5, "14.13.1","工时数据"),
    SALES_AREA_DATA(6, "1.12","可销数据");

    private int value;

    private String name;

    private String desc;

    EcnBusinessTypeEnum(int value, String name,String desc) {
        this.value = value;
        this.name = name;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }

    public static String getNameByValue(int value) {
        EcnBusinessTypeEnum arrObj[] = EcnBusinessTypeEnum.values();
        for (EcnBusinessTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
